<?php

    if (!empty($shenPinFanKuiData) && $shenPinFanKuiData['data']['count']>0) {
        $num = 1;
        $shenPinFanKuiCount = $shenPinFanKuiData['data']['count'];
        foreach ($shenPinFanKuiData['data']['res'] as $k => $v) {
            $message_val = !empty($v['message_val'])?json_decode($v['message_val'],true):'';
            $pack_name = $message_val['pack_name'];
            $application = $message_val['application'];
            $appStatus = $message_val['appStatus']==1 ? '通过' : '未通过';
            $approver = $message_val['approver'];
            $appSuggest = $message_val['appSuggest'];
            $message_state = !empty($v['message_state'])?$v['message_state']:2;  //2未阅读
            $message_user_group_id = !empty($v['message_user_group_id'])?$v['message_user_group_id']:0;
            //--资产包/单项目详情页链接---权限控制
            if (!empty($v['is_package'])&&$v['is_package']==1) {
                $titleAlt = "资产包名称";
            }else{
                $titleAlt = "项目名称";
            }
            if(!empty($v['is_package']) && $v['is_package'] == 1){
                $isView = \backend\controllers\DtActionFilter::checkPackage('package_view',$v['package_project_id']);
                if($isView){
                    $packageUrl ='/package/detail-info?packageid='.$v['package_project_id'].'&message_state='.$message_state.'&message_user_group_id='.$message_user_group_id;
                }else{
                    $packageUrl ='#';
                }
            }else{
                $isView = \backend\controllers\DtActionFilter::checkProject('project_view',$v['package_project_id']);
                if($isView){
                    $packageUrl = '/project/getinfodata?project_id='.$v['package_project_id'].'&message_state='.$message_state.'&message_user_group_id='.$message_user_group_id;
                }else{
                    $packageUrl = '#';
                }
            }

            $upTime = !empty($v['message_start_time'])?$v['message_start_time']:'无时间';
            if ($num<=10){
                $num++;
                echo <<<SHENPINFANKUI
                <div class="remand-list spfk">
                    <div class="remand-list-nav clearfix">
                    <span class="pull-left nav-l">审批反馈</span>
                    <span class="nav-s"></span>
                    <div class="pull-right qcl">
                        <img src="/image/officeHall/qwck.png" class="pull-left qwck">
                        <a href="$packageUrl"><span class="pull-left ">前往查看</span></a>
                    </div>
                    </div>
                    <div class="remand-list-content clearfix">
                        <span>$titleAlt ： <font> <a href="$packageUrl">$pack_name</a></font></span>
                        <span>当前状态： <font>$application </font></span>
                        <span>审批状态 : <font>$appStatus</font></span>
                        <span>审批人: <font>$approver</font></span></br>
                        <span>审批意见： <font> $appSuggest</font></span>
                        <span class="pull-right">$upTime</span>
                    </div>
                </div>
SHENPINFANKUI;
            }
        }
    }
?>



